<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js" type="text/javascript"></script>
    <script src="vue-resource.js" type="text/javascript"></script>
</head>
<body>

<div id="box">
    <button type="button" value="添加" @click="add">添加</button>
   <ul>
       <li v-for="val in arr" track-by="$index">
           {{val}}
       </li>
   </ul>
</div>

<script>
    var vm = new Vue({
        data:{
            arr:['apple','banana']
        },
        methods:{
            add:function(){
                this.arr.push('orange');
            }
        }

    }).$mount("#box"); //手动挂载

</script>
</body>
</html>